package com.t.bricks.bussiness.db.entity.cookbook.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.t.bricks.annotation.DataInfo;

/**
 * 菜谱'Cookbook'表实体类
 * 警告:非数据库字段禁止在此添加,应该创建扩展实体中添加
 * @author HuangXinBian
 */
@ApiModel("菜谱Cookbook")
@DataInfo(sDbName="BricksMall", sTableName="Cookbook")
public class CookbookBase implements Serializable {

	private static final long serialVersionUID = 1L;// 使用rmi时需修改

	/**
	 * 编号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sId", sComment="编号", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=true, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=0 )
	@ApiModelProperty(value="编号", example="", position=0)
	//[end]
	protected String sId;

	/**
	 * 商品条码(组合唯一)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sWaresNo", sComment="商品条码(组合唯一)", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=1 )
	@ApiModelProperty(value="商品条码(组合唯一)", example="", position=1)
	//[end]
	protected String sWaresNo;

	/**
	 * 名称(组合唯一)
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sName", sComment="名称(组合唯一)", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=64, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=2 )
	@ApiModelProperty(value="名称(组合唯一)", example="", position=2)
	//[end]
	protected String sName;

	/**
	 * 标题
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sTitle", sComment="标题", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=3 )
	@ApiModelProperty(value="标题", example="", position=3)
	//[end]
	protected String sTitle;

	/**
	 * 内容
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sContent", sComment="内容", isDbField=true, sDbFileType="longtext",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=4 )
	@ApiModelProperty(value="内容", example="", position=4)
	//[end]
	protected String sContent;

	/**
	 * 备注
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sMemo", sComment="备注", isDbField=true, sDbFileType="varchar",
		sDefaultData="", isExtra=false, iskey=false, isNull=true,
		iMaxLength=200, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=5 )
	@ApiModelProperty(value="备注", example="", position=5)
	//[end]
	protected String sMemo;

	/**
	 * 创建人
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sCreator", sComment="创建人", isDbField=true, sDbFileType="varchar",
		sDefaultData="00000000", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=6 )
	@ApiModelProperty(value="创建人", example="00000000", position=6)
	//[end]
	protected String sCreator;

	/**
	 * 创建日期
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="dCreateDate", sComment="创建日期", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=7 )
	@ApiModelProperty(value="创建日期", example="", position=7)
	//[end]
	protected Date dCreateDate;

	/**
	 * 修改人
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="sModifieder", sComment="修改人", isDbField=true, sDbFileType="varchar",
		sDefaultData="00000000", isExtra=false, iskey=false, isNull=false,
		iMaxLength=32, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=8 )
	@ApiModelProperty(value="修改人", example="00000000", position=8)
	//[end]
	protected String sModifieder;

	/**
	 * 修改日期
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//解决表单提交时字符串时间值错误
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="dModifiedDate", sComment="修改日期", isDbField=true, sDbFileType="datetime",
		sDefaultData="", isExtra=false, iskey=false, isNull=false,
		iMaxLength=23, isDecimal=false, iIntegralLength=-1, iDecimalLength=-1, iIndex=9 )
	@ApiModelProperty(value="修改日期", example="", position=9)
	//[end]
	protected Date dModifiedDate;

	/**
	 * 状态
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="iState", sComment="状态", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=10 )
	@ApiModelProperty(value="状态", example="1", position=10)
	//[end]
	protected Integer iState;

	/**
	 * 序号
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="iIndex", sComment="序号", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=11 )
	@ApiModelProperty(value="序号", example="1", position=11)
	//[end]
	protected Integer iIndex;

	/**
	 * 版本
	 */
	//[start]
	@DataInfo( sDbName="BricksMall", sTableName="Cookbook",
		sName="iVersion", sComment="版本", isDbField=true, sDbFileType="int",
		sDefaultData="1", isExtra=false, iskey=false, isNull=false,
		iMaxLength=100, isDecimal=false, iIntegralLength=2, iDecimalLength=2, iIndex=12 )
	@ApiModelProperty(value="版本", example="1", position=12)
	//[end]
	protected Integer iVersion;

	/**
	 * 取 编号
	 * @return String
	 */
	public String getsId() {
		return sId;
	}

	/**
	 * 设置编号
	 * @param sId
	 */
	public void setsId(String sId) {
		this.sId = sId;
	}

	/**
	 * 取 商品条码(组合唯一)
	 * @return String
	 */
	public String getsWaresNo() {
		return sWaresNo;
	}

	/**
	 * 设置商品条码(组合唯一)
	 * @param sWaresNo
	 */
	public void setsWaresNo(String sWaresNo) {
		this.sWaresNo = sWaresNo;
	}

	/**
	 * 取 名称(组合唯一)
	 * @return String
	 */
	public String getsName() {
		return sName;
	}

	/**
	 * 设置名称(组合唯一)
	 * @param sName
	 */
	public void setsName(String sName) {
		this.sName = sName;
	}

	/**
	 * 取 标题
	 * @return String
	 */
	public String getsTitle() {
		return sTitle;
	}

	/**
	 * 设置标题
	 * @param sTitle
	 */
	public void setsTitle(String sTitle) {
		this.sTitle = sTitle;
	}

	/**
	 * 取 内容
	 * @return String
	 */
	public String getsContent() {
		return sContent;
	}

	/**
	 * 设置内容
	 * @param sContent
	 */
	public void setsContent(String sContent) {
		this.sContent = sContent;
	}

	/**
	 * 取 备注
	 * @return String
	 */
	public String getsMemo() {
		return sMemo;
	}

	/**
	 * 设置备注
	 * @param sMemo
	 */
	public void setsMemo(String sMemo) {
		this.sMemo = sMemo;
	}

	/**
	 * 取 创建人
	 * @return String
	 */
	public String getsCreator() {
		return sCreator;
	}

	/**
	 * 设置创建人
	 * @param sCreator
	 */
	public void setsCreator(String sCreator) {
		this.sCreator = sCreator;
	}

	/**
	 * 取 创建日期
	 * @return Date
	 */
	public Date getdCreateDate() {
		return dCreateDate;
	}

	/**
	 * 设置创建日期
	 * @param dCreateDate
	 */
	public void setdCreateDate(Date dCreateDate) {
		this.dCreateDate = dCreateDate;
	}

	/**
	 * 取 修改人
	 * @return String
	 */
	public String getsModifieder() {
		return sModifieder;
	}

	/**
	 * 设置修改人
	 * @param sModifieder
	 */
	public void setsModifieder(String sModifieder) {
		this.sModifieder = sModifieder;
	}

	/**
	 * 取 修改日期
	 * @return Date
	 */
	public Date getdModifiedDate() {
		return dModifiedDate;
	}

	/**
	 * 设置修改日期
	 * @param dModifiedDate
	 */
	public void setdModifiedDate(Date dModifiedDate) {
		this.dModifiedDate = dModifiedDate;
	}

	/**
	 * 取 状态
	 * @return Integer
	 */
	public Integer getiState() {
		return iState;
	}

	/**
	 * 设置状态
	 * @param iState
	 */
	public void setiState(Integer iState) {
		this.iState = iState;
	}

	/**
	 * 取 序号
	 * @return Integer
	 */
	public Integer getiIndex() {
		return iIndex;
	}

	/**
	 * 设置序号
	 * @param iIndex
	 */
	public void setiIndex(Integer iIndex) {
		this.iIndex = iIndex;
	}

	/**
	 * 取 版本
	 * @return Integer
	 */
	public Integer getiVersion() {
		return iVersion;
	}

	/**
	 * 设置版本
	 * @param iVersion
	 */
	public void setiVersion(Integer iVersion) {
		this.iVersion = iVersion;
	}

	/**
	 * 复制对象
	 * @param source 数据源
	 * @return CookbookBase
	 */
	public static CookbookBase copy(CookbookBase source) {
		if (null == source) {
			return null;
		}
		
		CookbookBase target = new CookbookBase();
		target.setsId(source.getsId());
		target.setsWaresNo(source.getsWaresNo());
		target.setsName(source.getsName());
		target.setsTitle(source.getsTitle());
		target.setsContent(source.getsContent());
		target.setsMemo(source.getsMemo());
		target.setsCreator(source.getsCreator());
		target.setdCreateDate(source.getdCreateDate());
		target.setsModifieder(source.getsModifieder());
		target.setdModifiedDate(source.getdModifiedDate());
		target.setiState(source.getiState());
		target.setiIndex(source.getiIndex());
		target.setiVersion(source.getiVersion());

		return target;
	}
	
	/**
	 * 克隆对象
	 * @return CookbookBase
	 */
	public CookbookBase clone() {
		return copy(this);
	}
	
}
